<#include "../seajs-config.ftl"/>
<@SeaConfig static={
    'alias' : {
        'login-dialog.css' : "login/util/login-dialog/css/login-dialog.css",
        'validator' : 'login/util/validation/js/jquery.validate.js',
        'login-dialog' : 'login/util/login-dialog/js/login-dialog.js'
    }
}/>
<script type="text/javascript">
    seajs.use(['validator','login-dialog'],function (validator,loginDialog) {
        var dialog = loginDialog.createDialog();

        // 登录
        $(document).delegate('#J-header-login','click',function (e) {
            e.preventDefault();
            dialog.open('login');
        });
        // 注册
        $(document).delegate('#J-header-signin','click',function (e) {
            e.preventDefault();
            dialog.open();
        });
    });
</script>